<template>
  <div id="app">
    <Background />  <!-- 将背景组件放在这里 -->
    <header>
      <nav>
        <router-link to="/" class="nav-link">Home</router-link>
        <router-link to="/login" class="nav-link">Login</router-link>
        <router-link to="/register" class="nav-link">Register</router-link>
        <router-link to="/delete" class="nav-link">Delete</router-link>
        <router-link to="/members" class="nav-link">Members</router-link>
      </nav>
    </header>
    <router-view></router-view>
  </div>
</template>

<script>
import Background from "./views/Background.vue";  // 引入背景组件

export default {
  name: 'App',
  components: {
    Background,  // 注册背景组件
  },
};
</script>

<style scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  position: relative; /* 确保背景和内容层叠 */
  background-size: cover;
  background-color: rgba(0, 0, 0, 0);
}

nav {
  background-color: rgba(0, 0, 0, 0.5);
}

.nav-link {
  margin-right: 50px; /* 增加间隔 */
  color: #42b983;
}

.nav-link:last-child {
  margin-right: 0; /* 最后一个链接不需要额外的右边距 */
}
</style>
